<?php
namespace Controllers;
use Resources,
    Libraries;
class Home extends Libraries\PController {
    public function __construct() {

        parent::__construct();
    }
    public function index() {
        $config = Resources\Config::main();
        $data['title'] = $config['appname'];
        $this->output('home', $data);
    }
    public function tree() {
        if (Libraries\u::isAjaxRequest()) {
            echo Libraries\u::getMenuTree('admin');
        } else {
            $this->redirect('home');
        }
    }
}
